Add access modifier to VolumeVO#9394
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #9394 +/- ##
============================================
- Coverage 15.81% 15.81% -0.01%
+ Complexity 12554 12553 -1
============================================
Files 5629 5629
Lines 492023 492023
Branches 62519 63929 +1410
============================================
- Hits 77813 77812 -1
Misses 405887 405887
- Partials 8323 8324 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
good code @FelipeM525, but is there a cause for this? I mean is there a plan to exploit this ? |
I have same questions |
Hello @DaanHoogland, Given the scope of Cloudstack and the number of people that work on this project, I believe it's important to emphasize keeping the code base clean by applying clean code principles and respecting the main concept of Java, which is OOP. Therefore, we should make sure classes have private access modifiers and that fields aren't accessed directly without getters so as to adhere to encapsulation. |
|
@blueorangutan package |
|
@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10397 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-10909) |
|
@weizhouapache could you run the test again? |
|
@blueorangutan test rocky8 kvm-rocky8 |
|
@weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11008)
|
|
|
@blueorangutan package |
|
@JoaoJandre a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10673 |
|
@weizhouapache could you run tests? |
|
@blueorangutan LLtest |
|
@DaanHoogland a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
…ere a field was being accessed without a getter
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11097 |
The log4j 1.2 dependency could not be completely removed because juniper contrail has log4j as a dependency. So we still have this dependency somewhere in the code. |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11295 |
|
@blueorangutan package |
|
@BryanMLima a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11659 |
|
@DaanHoogland could we run the CI here? |
@JoaoJandre , our lab has been very busy the last few days. I'll have a go later tonight or in the weekend. |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@FelipeM525 @JoaoJandre , I did not investigate deeply but systemVMs do not start in this env: |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
[SF] Trillian Build Failed (tid-11856) |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11724 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11859)
|
* added private access modifiers to VolumeVO and fixed an occurrence where a field was being accessed without a getter * renamed the field hostip to hostIp and removed duplicated methods apache#9394 (comment)
Port 4.20 - Add access modifier to VolumeVO apache#9394 See merge request scclouds/scclouds!1057
Description
The class
VolumeVOlacks access modifiers in its fields. This PR aims to improve adherence to object-oriented programming by adding private access modifiers to all fields in the class mentioned above, along with their respective getters and setters. I've also added a getter to an occurrence inVolumeApiServiceImplwhere a field belonging toVolumeVOwas being accessed directly.Types of changes
Feature/Enhancement Scale
How Has This Been Tested?
I ran all the tests related to
VolumeVOandVolumeApiServiceImpl, checked all usages of both classes, and made sure nothing was broken.